fix: filter Serilog-formatted log messages in E2E tests#244
Merged
DamianReeves merged 1 commit intomainfrom Dec 19, 2025
Merged
fix: filter Serilog-formatted log messages in E2E tests#244DamianReeves merged 1 commit intomainfrom
DamianReeves merged 1 commit intomainfrom
Conversation
## Problem
E2E tests were failing because WolverineFx 5.8.0 logs are written to
stderr with Serilog formatting: [HH:mm:ss INF] / [HH:mm:ss WRN] etc.
The ExecutableRunner's log filtering wasn't catching these formatted
messages, causing 20 E2E tests to fail when infrastructure logs
contaminated test output.
## Solution
Added regex pattern to detect and filter Serilog-formatted log messages:
- Pattern: ^\[\d{2}:\d{2}:\d{2}\s+(INF|WRN|DBG)\]
- Filters all INFO, WARN, and DEBUG level logs from Wolverine/hosting
- Preserves actual command output and error messages
## Testing
Will verify with E2E test run after deploying this fix.
## Related
- Addresses issue #242 (WolverineFx 5.9.0 upgrade tracking)
- Fixes E2E test failures seen in deployment run #20362505745
🤖 Generated with [Claude Code](https://claude.com/claude-code)
This was referenced Dec 19, 2025
Copilot AI
added a commit
that referenced
this pull request
Dec 19, 2025
- Merged origin/main which includes: - PR #244: Serilog-formatted log message filtering (regex pattern) - PR #245: @ignore tags on unimplemented AOT tests - PR #247: Build/package validation tests enabled - Added 2 new unit tests for Serilog log filtering: - IsInfrastructureLogMessage_ShouldFilter_SerilogFormattedLogs - IsInfrastructureLogMessage_ShouldNotFilter_NonSerilogBracketedContent - All 20 implemented tests pass (8 unit tests + 12 E2E BDD tests) - 21 AOT tests skipped as expected (@ignore tags from main) The merge combined our change (internal visibility) with main's change (Serilog regex filtering), and both features work together correctly. Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com>
22 tasks
DamianReeves
added a commit
that referenced
this pull request
Dec 19, 2025
* Initial plan * feat: Upgrade WolverineFx to 5.9.0 and add log filtering unit tests - Upgrade WolverineFx from 5.8.0 to 5.9.0 in Directory.Packages.props - Add ExecutableRunnerTests.cs with comprehensive unit tests for log filtering - Tests verify that both WolverineFx 5.8.0 and 5.9.0 log patterns are filtered correctly - Tests confirm that actual command output and error messages are NOT filtered - All E2E tests pass with WolverineFx 5.9.0 (18 passed, 20 failed due to unimplemented AOT tests) The existing log filtering logic in ExecutableRunner.cs already handles WolverineFx 5.9.0 log patterns correctly. The new "Exporting Open Telemetry metrics" message is filtered by the existing "Open Telemetry metrics" pattern match. Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com> * refactor: Address code review feedback on log filtering tests - Make IsInfrastructureLogMessage internal (was private) for testability - Remove duplicated logic in test file - tests now call ExecutableRunner.IsInfrastructureLogMessage directly - Fix test method name: IsInfrastructureLogMessage_ShouldNotFilter_JsonOutputErrorsField (was incorrectly named Should Filter) - All 18 E2E tests still pass after refactoring Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com> * Upgrade WolverineFx to 5.9.0 with log filtering unit tests Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com> * feat: merge main and add Serilog log filtering tests - Merged origin/main which includes: - PR #244: Serilog-formatted log message filtering (regex pattern) - PR #245: @ignore tags on unimplemented AOT tests - PR #247: Build/package validation tests enabled - Added 2 new unit tests for Serilog log filtering: - IsInfrastructureLogMessage_ShouldFilter_SerilogFormattedLogs - IsInfrastructureLogMessage_ShouldNotFilter_NonSerilogBracketedContent - All 20 implemented tests pass (8 unit tests + 12 E2E BDD tests) - 21 AOT tests skipped as expected (@ignore tags from main) The merge combined our change (internal visibility) with main's change (Serilog regex filtering), and both features work together correctly. Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DamianReeves <957246+DamianReeves@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
E2E tests were failing in deployment run #20362505745 with 20 test failures across all platforms. The root cause was WolverineFx 5.8.0 writing infrastructure logs to stderr using Serilog formatting:
[HH:mm:ss INF],[HH:mm:ss WRN], etc.The ExecutableRunner's
IsInfrastructureLogMessagemethod wasn't filtering these formatted messages, causing infrastructure logs to contaminate test output and fail assertions.Solution
Added regex pattern to detect and filter Serilog-formatted log messages:
^\[\d{2}:\d{2}:\d{2}\s+(INF|WRN|DBG)\]Changes
tests/Morphir.E2E.Tests/Infrastructure/ExecutableRunner.cs: Added Serilog format detectionTesting
Impact
This unblocks:
Related
🤖 Generated with Claude Code